package org.goj.practice.dto;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.Data;

import java.util.List;

/**
 * @author CK
 * @date 2021/3/31 18:02
 */
@Data
@XStreamAlias("item")
public class ProblemDTO {

    /**
     * 标题
     */
    @XStreamAsAttribute
    @XStreamAlias("title")
    private String title;

    /**
     * 题目描述
     */
    @XStreamAsAttribute
    @XStreamAlias("description")
    private String description;

    /**
     * 输入说明
     */
    @XStreamAsAttribute
    @XStreamAlias("input")
    private String input;

    /**
     * 输出说明
     */
    @XStreamAsAttribute
    @XStreamAlias("output")
    private String output;

    /**
     * 输入参照
     */
    @XStreamAsAttribute
    @XStreamAlias("sample_input")
    private String sampleInput;

    /**
     * 输出参照
     */
    @XStreamAsAttribute
    @XStreamAlias("sample_output")
    private String sampleOutput;

    /**
     * 暗示
     */
    @XStreamAsAttribute
    @XStreamAlias("hint")
    private String hint;

    /**
     * 限时（S）
     */
    @XStreamAsAttribute
    @XStreamAlias("time_limit")
    private Double timeLimit;

    /**
     * 空间限制(kb)
     */
    @XStreamAsAttribute
    @XStreamAlias("memory_limit")
    private Integer memoryLimit;

    /**
     * 测试输入
     */
    @XStreamAsAttribute
    @XStreamImplicit(itemFieldName = "test_input")
    private List<String> testInputs;

    /**
     * 测试输出
     */
    @XStreamAsAttribute
    @XStreamImplicit(itemFieldName = "test_output")
    private List<String> testOutputs;

    @XStreamAsAttribute
    @XStreamAlias("source")
    private String source;

    @XStreamAsAttribute
    @XStreamImplicit(itemFieldName = "solution")
    private List<String> solution;

    @XStreamAsAttribute
    @XStreamImplicit(itemFieldName = "img")
    private List<String> img;

}
